<template>
    <div class="activity">
        <p class="tobuy">
            <img src="../assets/images/usualDay-01.png" alt="">
             <a href="javascript:void(0);" @click="openApp"></a>
        </p>
        <p>
            <img src="../assets/images/usualDay-02.png" alt="">
            
        </p>
        <p>
            <img src="../assets/images/usualDay-03.png" alt="">
        </p>
        <p>
            <img src="../assets/images/usualDay-04.png" alt="">
        </p>
       <open-app ref="openApp"></open-app>
    </div>
</template>
<script>
import openApp from './OpenApp'
export default {
    data () {
        return {
            gid: 'e6c4328e-4b52-4765-806f-a93592bac0ae',
            storeId: 'f45932bb-9412-4f77-9706-8f7a1e9dfbd8'
        }
    },
    created () {
        // if (navigator.userAgent.match(/android/i)) {
        //     this.downLink = this.androidUrl
        // } else if (navigator.userAgent.match(/(iPhone|iPod|iPad);?/i)) {
        //     this.downLink = this.iosUrl
        // }
    },
    components: {
        openApp
    },
    methods: {
        openApp () {
            let gid = this.$route.query.gid || this.gid
            let storeId = this.$route.query.storeId || this.storeId
            this.$refs.openApp.openApp([{ 'field': 'productUID', 'value': gid }, { 'field': 'salesOutletUID', 'value': storeId }], "TyActivity", false);
        }
    }
}
</script>
<style scoped>
body {
  background: #1e1b1b;
}
* {
  padding: 0;
  margin: 0;
  list-style: none;
}
.activity p {
  position: relative;
}
.activity p.tobuy a {
  position: absolute;
  top: 7.05rem;
  right: 2.89rem;
  width: 4.22rem;
  height: 1.02rem;
}
.activity p.download a {
  position: absolute;
  top: 4.2rem;
  right: 1.9rem;
  width: 1.5rem;
  height: 0.55rem;
}
img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}
</style>
